package com.nrrg.jgraphtTest;

public class nodeDemo {
    int id;
    float capacity;
    float traffic;

    public nodeDemo(int id, float capacity, float traffic) {
        this.id = id;
        this.capacity = capacity;
        this.traffic = traffic;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public float getCapacity() {
        return capacity;
    }

    public void setCapacity(float capacity) {
        this.capacity = capacity;
    }

    public float getTraffic() {
        return traffic;
    }

    @Override
    public String toString() {
        return "id="+id;

//        return "nodeDemo{" +
//                "id=" + id +
//                ", capacity=" + capacity +
//                ", traffic=" + traffic +
//                '}';
    }

    public void setTraffic(float traffic) {
        this.traffic = traffic;
    }

    public boolean overFlow(){
        if (this.capacity >= this.traffic) return false;
        else return true;
    }
}
